local function addTarget(t, callback)
  target(t)
    set_targetdir("../bin")
    add_includedirs("..","../3rd/nanovg/src","../3rd/sdl","../3rd/glad/include")
    add_packages("SDL2")
    set_kind("binary")
    add_files(t .. "/**.cc")
    if is_os("windows") then
      add_links("OpenGL32")
    else
      add_links("OpenGL")
    end
    add_deps("nanovg","glad")
    if callback then callback() end
  target_end()
end

addTarget("nano")
addTarget("nvg")